# 
#   Document   : application_helper.rb
#   Created on : Nov 24, 2007, 11:40:16 PM
#   Author     : Geoffrey.Dou   (geoffrey.dou@gmail.com)
#   Description:
#       Common method used in application.
#   Modified log:
#       Name: 
#       Time:
#       Log:
#
class Link < ActiveRecord::Base
    set_table_name 'urls'
    acts_as_taggable
    acts_as_commentable

    def taglist
        @taglist
    end
    
    def taglist=(tl)
        @taglist = tl
    end
    
    def exist?
        Link.find(:first, :conditions => ["body=?", self.body])
    end
    
    def comment_count
        self.comments.count
    end
end
